<!DOCTYPE html>
<html>
<head>
    <title>激活码生成</title>
    <#include "/header.html">
</head>

<body style="background: #fff;background:url(about:blank) fixed">
<link rel="stylesheet" type="text/css" href="${request.contextPath}/statics/css/htmleaf-demo.css">
<link rel="stylesheet" href="${request.contextPath}/statics/css/dcalendar.picker.css"/>
<script type="text/javascript" src="${request.contextPath}/statics/js/dcalendar.picker.js"></script>
<form class="form-horizontal" role="form" id="form-k">
    <div class="form-group">
        <label for="overtime" class="col-sm-2 control-label">过期时间</label>
        <div class="col-sm-10">

            <input id='overtime' v-model="overtime" readonly="readonly" type='text' class="form-control" style="width: 100%!important;"/>
        </div>
    </div>
    <div class="form-group">
        <label for="actcode" class="col-sm-2 control-label">激活码</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" ' v-model="actcode" id="actcode">
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-10">
            <div  class="btn btn-default" id="generate" @click="shengcheng">生成激活码</div>
        </div>
    </div>
</form>


<script>

    $("#generate").click(function () {
        var overtime=$("#overtime").val();
        $.ajax({
            async : true,
            dataType : "json",
            contentType: "json",
            url: "/sys/actCode/generate?data="+overtime, success: function (result) {
                console.log(result.actCode);
                $("#actcode").val(result.actCode);//填充内容

            }
        });
    });
    $('#overtime').dcalendarpicker({
        format:'yyyy-mm-dd'
    });


</script>


</body>
</html>